<html>
<?php
if ($_SERVER['HTTPS'] == TRUE) {
    echo '<meta http-equiv="refresh" content="0; url=https://';
    echo $_SERVER['HTTP_HOST'];
    echo '" />';
} else {
    echo '<meta http-equiv="refresh" content="0; url=http://';
    echo $_SERVER['HTTP_HOST'];
    echo '" />';
}
?>

</html>